#include<iostream>
#include<fstream>
#include<string>

using namespace std;

void test1()
{
	string str("helloworld!");
	ofstream ofs("file.txt");
	ofs << str;
	char arr[100];
	string str1;
	ofs.close();
	ifstream ifs("file.txt");
	ifs >> str1;
	cout << str1 << endl;
	

}

int main()
{
	test1();
	return 0;
}